nhc - Nearly a Haskell Compiler
نویسنده
چکیده
This paper describes nhc a compiler for a subset of Haskell. Nhc is the result of the author’s wish to have a Haskell compiler for his Acorn A5000 to play with. Previous the only Haskell system available for A5000 was Mark Jones’ gofer. The disadvantage of gofer is that it is written in C so the play part isn’t as fun as it could be. Nhc is written in Haskell with a small run-time system in C. It's possible to re-compile nhc with itself in 3MB of memory, using a lot of time. But as long as the interfaces between modules don’t change then the turn around time is quite tolerable. Nhc can profile the use of memory to make it easier to detect space leaks in programs. The profiling includes: What created the nodes in the heap? What does the heap consist of? How long time do the nodes in the heap live? Who is retaining the nodes?
منابع مشابه
Nhc: a Space-eecient Haskell Compiler
Self-compiling implementations of Haskell, i.e., those written in Haskell, have been and, except one, are still space consuming monsters. Object code size for the compilers themselves are 3-8 Mbyte, and they need 12-20 Mbyte to recompile themselves. One reason for the huge demands for memory is that the main goal for these compilers is to produce fast code. However, the compiler described in th...
متن کاملNew dimensions in heap pro ling
First-generation heap proolers for lazy functional languages have proved to be eeective tools for locating some kinds of space faults, but in other cases they cannot provide suucient information to solve the problem. This paper describes the design, implementation and use of a new prooler that goes beyond the two-dimensionaìwho produces what' view of heap cells to provide information about thei...
متن کاملNew Dimensions in Heap Prooling
First-generation heap proolers for lazy functional languages have proved to be eeective tools for locating some kinds of space faults, but in other cases they cannot provide suucient information to solve the problem. This paper describes the design, implementation and use of a new prooler that goes beyond the two-dimensionaìwho produces what' view of heap cells to provide information about thei...
متن کاملNew dimensions in heap pro lingCOLIN
First-generation heap proolers for lazy functional languages have proved to be eeective tools for locating some kinds of space faults, but in other cases they cannot provide suu-cient information to solve the problem. This paper describes the design, implementation and use of a new prooler that goes beyond the two-dimensionaìwho produces what' view of heap cells to provide information about the...
متن کاملLag, Drag, Void and Use { Heap Prooling and Space-eecient Compilation Revisited
The context for this paper is functional computation by graph reduction. Our overall aim is more eecient use of memory. The speciic topic is the detection of dormant cells in the live graph | those retained in heap memory though not actually playing a useful role in computation. We describe a prooler that can identify heap consumption by suchùseless' cells. Unlike heap proolers based on travers...
متن کامل